package com.example.demo0331.interceptor;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.servlet.HandlerInterceptor;

public class TestInterceptor implements HandlerInterceptor {
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
//        Object name = request.getAttribute("name");
//        System.out.println(name);
//        if (name == null) {
//            return false;
//        }
        return HandlerInterceptor.super.preHandle(request, response, handler);
    }
}
